#include "app_cfg.h"
#include "app_type.h"

#include "interfaces.h"
#include "tool/buffer/buffer.h"
#include "framework/vsfsm/vsfsm.h"
#include "framework/vsftimer/vsftimer.h"
#include "dal/usart_stream/usart_stream.h"

#include "comm.h"

#if COMM_UART1_ENABLE
static uint8_t uart1_buf_tx[UART1_BUF_TX_SIZE];
static uint8_t uart1_buf_rx[UART1_BUF_RX_SIZE];

static void uart1_ontx_int(void *param)
{
	//struct usart_stream_info_t *info = param;
	// TODO
}
static void uart1_onrx_int(void *param)
{
	//struct usart_stream_info_t *info = param;
	// TODO
}

struct usart_stream_info_t uart1_info = 
{
	1,
	{
		{
			{
				uart1_buf_tx,
				UART1_BUF_TX_SIZE,
			} // struct vsf_buffer_t
		}, // struct vsf_fifo_t
	}, // struct vsf_stream_t
	{
		{
			{
				uart1_buf_rx,
				UART1_BUF_RX_SIZE,
			} // struct vsf_buffer_t
		}, // struct vsf_fifo_t
	}, // struct vsf_stream_t
	{
		&uart1_info,
		&uart1_ontx_int,
		&uart1_onrx_int,
	},
	{
		961200,
		8,
		0,
	}, // struct usart_info_t
};
#endif 